import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class MainBC64 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        float a = scan.nextFloat() ;
        String b = scan.next() ;
         int sum = 20 ; 
         if(a > 1){
            int c =(int) (a-1) ; 
            if(c < (a-1)){
                c++ ;
            }
            sum += c ;
         }
         if(b.equals("y")){
            sum += 5 ;
         }
        System.out.println(sum) ; 
    }
}